package com.drojian.demo4.communication;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;

import androidx.activity.EdgeToEdge;
import androidx.appcompat.app.AppCompatActivity;
import androidx.core.graphics.Insets;
import androidx.core.view.ViewCompat;
import androidx.core.view.WindowInsetsCompat;

import com.drojian.demo.R;

public class RxBusActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        EdgeToEdge.enable(this);
        setContentView(R.layout.part4_activity_rx_bus);

        findViewById(R.id.btn).setOnClickListener( v->{
                RxBus.getDefault().post(new EventMessage("张三", 18, "男"));
                startActivity(new Intent(RxBusActivity.this, RxBusReceiveActivity.class));
        });
    }

}